package io.renren.modules.sys.dao;

import io.renren.modules.sys.entity.AgentEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.renren.modules.sys.entity.BusinessEntity;
import io.renren.modules.sys.entity.SysUserEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.*;

/**
 * 代理商
 * 
 * @author Mark
 * @email sunlightcs@gmail.com
 * @date 2019-10-11 10:46:27
 */
@Mapper
public interface AgentDao extends BaseMapper<AgentEntity> {
    List<SysUserEntity> getAgentList(@Param("username") String username, @Param("mobile") String mobile,@Param("userid") Long userid, @Param("currPage") Integer currPage,
                                 @Param("pageSize") Integer pageSize);
    int queryListcount(@Param("username") String username, @Param("mobile") String mobile,@Param("userid") Long userid);

    List<BusinessEntity> getBusinessList(@Param("username") String username, @Param("mobile") String mobile,
                                         @Param("userid") Long userid,@Param("role") String role, @Param("currPage") Integer currPage,
                                         @Param("pageSize") Integer pageSize);
    int queryBusinessListcount(@Param("username") String username, @Param("mobile") String mobile,
                      @Param("userid") Long userid,@Param("role") String role);

    int queryLineCodeNum(@Param("userid")Integer userid);

    int querySaleLineCodeNum(@Param("userid")Integer userid);

    SysUserEntity queryAgentBySaleid(@Param("saleid")Integer saleid);
}
